package com.cictec.middleware.api.distribute;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import com.cictec.middleware.commons.utils.Result;
import com.cictec.middleware.core.entity.Device;

/**
 * 中间件对外业务处理接口
 * 
 * @author Administrator
 *
 */
public interface MiddlewareDeviceService {

	@RequestMapping(value = "/distribute/deviceConnectByDevcode")
	public Result deviceConnectByDevcode(@RequestParam("devCode") String devCode);

	@RequestMapping(value = "/distribute/deviceDisConnect")
	public Result deviceDisConnect(@RequestParam("devCode") String devCode);

	/**
	 * 设备连接，通过设备号或者设备序列号
	 * 
	 * @param serialNumber
	 * @return data JSONObject
	 */
	@RequestMapping(value = "/distribute/getDeviceBySerialNumber")
	public Device getDeviceBySerialNumber(@RequestParam("serialNumber") String serialNumber);

	/**
	 * 设备连接，通过设备号或者设备序列号
	 * 
	 * @param devCode
	 * @return data JSONObject
	 */
	@RequestMapping(value = "/distribute/getDeviceByDevCode")
	public Device getDeviceByDevCode(@RequestParam("serialNumber") String devCode);
	
	@RequestMapping(value = "/distribute/updateDeviceSerialNumber")
	public Result updateDeviceSerialNumber(@RequestParam("devCode") String devCode,
			@RequestParam("serialNumber") String serialNumber);

}
